<template>
  <div class='ls-opinion'>
    <van-popup v-model="$store.state.dias.acheet.show" position='bottom'>
      <van-picker show-toolbar :columns="$store.state.dias.acheet.columns" @cancel="onCancel" @confirm="onConfirm"/>
    </van-popup>

    <van-popup v-model="$store.state.dias.datetime.dateShow" position='bottom'>
      <van-datetime-picker type="date" :min-date="minDate" @cancel="onCancel" @confirm="onConfirmtime"/>
    </van-popup>

    <van-popup v-model="$store.state.dias.datetime.timeShow" position='bottom'>
      <van-datetime-picker type="time" :min-date="minDate" @cancel="onCancel" @confirm="onConfirmtime"/>
    </van-popup>

    <van-popup v-model="$store.state.dias.datetime.datetimeShow" position='bottom'>
      <van-datetime-picker type="datetime" :min-date="minDate" @cancel="onCancel" @confirm="onConfirmtime"/>
    </van-popup>
  </div>
</template>
<script>
export default {
  props:['showdias','columns'],
  components: {},
  name: "",
  data() {
    return {
      minDate: new Date(),
    };
  },
  methods: {
    onCancel(){
      this.$store.state.dias.acheet.show=false
      this.$store.state.dias.datetime.dateShow=false
      this.$store.state.dias.datetime.timeShow=false
      this.$store.state.dias.datetime.datetimeShow=false
    },
    onConfirm(value,index){
      this.$store.state.dias.acheet.confirm(value,index)
    },
    onConfirmtime(value){
      this.$store.state.dias.datetime.confirm(value)
    }
  },
  created() {},
};
</script>
<style lang="scss" scoped>
.ls-opinion {
}
</style>